/* 心跳包 */
exports.run = (info, core, socket, logger) => {
  if (!socket.charging) { return; }
  const Charging = core.getModel('Charging');
  const reader = new core.BufferReader(info.data),
      userId = reader.read(2),
      cmdIndex = reader.read(2),
      heartBeatResp = reader.read(2);
  // 设备已经签到才做出应答 发送 0x48 服务器系统心跳包信息应答
  socket.charging && Charging.access(socket.charging).then(() => {
    socket.sendCommands(0x48, core.concat([
      userId,
      cmdIndex,
      heartBeatResp
    ]));
  });
}
